# Game imports
from character import *

"""
Player class

Represents a physical player who is playing the game.
"""
class Player(object):
    def __init__(self, name, game):
        self.name = name
        self.entity = Character(game, name, self)
        self.score = 0
        self.score_since_death = 0
        self.score_since_on_ground = 0
    
    def run_left(self):
        self.entity.run_left()
    def run_right(self):
        self.entity.run_right()
    def stop_left(self):
        self.entity.stop_left()
    def stop_right(self):
        self.entity.stop_right()
    def jump_start(self):
        self.entity.jump_start()
    def jump_end(self):
        self.entity.jump_end()
    
    def respawn(self):
        self.score_since_death = 0
        self.score_since_on_ground = 0
    
    def on_touch_ground(self):
        self.score_since_on_ground = 0
    def on_leave_ground(self):
        pass
